package com.meituan.pojo.resp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseResp {
    //状态码
    private Integer code;
    //响应头
    private String msg;
    //响应数据
    private Object data;

    public BaseResp SUCCESS(){
        return new BaseResp(1,"success",null);
    }

    public BaseResp ERROR(){
        return new BaseResp(0,"error",null);
    }

    public BaseResp UnAuthor(){
        return new BaseResp(0,"没有权限!",null);
    }
}
